import os
import threading

RUN_APP_LIST = [
    'com.alipay.iot.master',
    'com.alipay.iot.ic',
    'com.alipay.iot.service',
    'com.alipay.iot.osupdate',
    'com.alipay.iot.systemcommand',
    'com.alipay.iot.osupdate',
    'com.alipay.mapp.content.service',
    'com.alipay.iot.settings',
    'zoloz.phone.android.alipay.com.dragonfly',
    'com.alipay.zoloz.smile',
    'com.alipay.iot.xpaas',
    'com.alipay.mapp.content.service',
    'com.alipay.mapp.content.display',
    'com.alipay.iot.profile',
    'com.alipay.iot.merchantplugin',
    'com.alipay.iot.miniapp.shell',
    'com.alipay.iot.bootwizard'
]


def run(args):
    print(args)
    os.system(args)


for num in range(len(RUN_APP_LIST)):
    cmd_monkey = "adb shell monkey -p " + RUN_APP_LIST[num] + " --throttle 500 10000"
    t = threading.Thread(target=run, args=(cmd_monkey,))
    t.start()
